package com.example.commons.entity;

import cn.hutool.json.JSONObject;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * @program: authority-v3.0.7
 * @ClassName:Equip
 * @description: 套装列表 实体类
 * @author:dyy
 * @Version 3.0
 **/

@Data
@Builder(toBuilder = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "sys_suit", autoResultMap = true)
@Schema(title = "Suit对象", description = "套装列表")
public class Suit implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(title = "序列号")
    @TableId(value = "id", type = IdType.AUTO)
    @ExcelProperty("序列号")
    private Long id;

    @Schema(title = "套装名称")
    @TableField("name")
    @ExcelProperty("套装名称")
    private String name;

    @Schema(title = "套装属性")
    @TableField(value = "attribute", typeHandler = JacksonTypeHandler.class)
    @ExcelProperty("套装属性")
    private List<Map<String, Object>> attribute;

    @Schema(title = "套装效果")
    @TableField(value = "effect", typeHandler = JacksonTypeHandler.class)
    @ExcelProperty("套装效果")
    private List<Map<Object, String>> effect;

    @Schema(title = "套装详情")
    @TableField("content")
    @ExcelProperty("套装详情")
    private String content;

    @Schema(title = "品级（1：凡品；2：良品；3：上品；4：特品；5：仙品；6：神珍）")
    @TableField("grade")
    @ExcelProperty("品级")
    private Integer grade;
}
